package com.yonyou.pmclouds.alterandvisacategory.mapper;

import com.yonyou.pmclouds.alterandvisacategory.entity.AlterAndVisaCategoryVO;
import com.yonyou.pmclouds.basecom.dao.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

public interface AlterAndVisaCategoryMapper extends BaseMapper<AlterAndVisaCategoryVO> {
    @Select("select count(*) from pm_altervisacategory where pk_tenant = #{pkTenant} and sname = #{sname} and dr = 0 ")
    int countName(@Param("pkTenant") String pkTenant, @Param("sname") String sname);

    @Select("select * from pm_altervisacategory where pk_tenant = #{pkTenant} and is_visa = #{isVisa} and dr = 0 order by creationtime asc")
    AlterAndVisaCategoryVO[] getAllAlterAndVisaCategory(@Param("pkTenant") String pkTenant, @Param("isVisa") Byte isVisa);

    AlterAndVisaCategoryVO[] queryByIds(String[] ids);
}
